import glob
with open('seg_list.txt', 'w') as f:
    for p in glob.glob('/home/lwy/dsl_qua_test/qua_images/*.jpg'):
        f.write(p+'\n')
        f.flush()
